Chapter 18 PetitParser : Building Modular Parsers
نویسنده
چکیده
Building parsers to analyze and transform data is a common task in software development. In this chapter we present a powerful parser framework called PetitParser. PetitParser combines many ideas from various parsing technologies to model grammars and parsers as objects that can be reconfigured dynamically. PetitParser was written by Lukas Renggli as part of his work on the Helvetia system 1 but it can be used as a standalone library.
منابع مشابه
Practical Dynamic Grammars for Dynamic Languages
Grammars for programming languages are traditionally specified statically. They are hard to compose and reuse due to ambiguities that inevitably arise. PetitParser combines ideas from scannerless parsing, parser combinators, parsing expression grammars and packrat parsers to model grammars and parsers as objects that can be reconfigured dynamically. Through examples and benchmarks we demonstrat...
متن کاملHow to Design a Connectionist Holistic Parser
Connectionist holistic parsing offers a viable and attractive alternative to traditional algorithmic parsers. With exposure to a limited subset of grammatical sentences and their corresponding parse trees only, a holistic parser is capable of learning inductively the grammatical regularity underlying the training examples that affects the parsing process. In the past, various connectionist pars...
متن کاملTop-Down Parsing with Parsing Contexts A Simple Approach to Context-Sensitive Parsing
The domain of context-free languages has been extensively explored and there exist numerous techniques for parsing (all or a subset of) context-free languages. Unfortunately, some programming languages are not context-free. Using standard context-free parsing techniques to parse a context-sensitive programming language poses a considerable challenge. Implementors of programming language parsers...
متن کاملSimple , efficient , sound - and - complete combinator parsing for all context - free grammars , using an oracle OCaml 2014 workshop , talk proposal Tom
The combinator parsing interface allows parsers to be combined easily, and parsers to be parameterized by other parsers. Guaranteed termination means that, however the parsers are constructed, parsing is guaranteed to terminate. “Good theoretical behaviour” means, for example, that equational reasoning about parsers is supported, and not subject to side conditions about the termination of the p...
متن کاملA Case Study in Functional Programming: Generating Eecient Functional Lr(1) Parsers
This paper presents a case study in functional programming. The paper is based upon a chapter of the course notes of a grammars and parsing course which the authors have given to undergraduate students. The chapter presents a functional program that generates eecient functional LR(1) parsers.
متن کاملذخیره در منابع من
با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید
عنوان ژورنال:
دوره شماره
صفحات -
تاریخ انتشار 2014